package main

import (
	"fmt"
	"strings"
)

func main(){
//	从键盘接受用户的输入，判断输入是否为整型，包括十进制，二进制，八进制，十六进制
	var num string
	var num_str = ""
	fmt.Println("请输入一个字符串")
	fmt.Scan(&num)
	if strings.Contains(num[0:2], "0b"){
		num_str = "01"
	}else if strings.Contains(num[0:2], "0o"){
		num_str = "01234567"
	}else if strings.Contains(num[0:2], "0x") {
		num_str = "0123456789abcdef"
	}else {
		num_str = "0123456789"
	}
	flag := 0
	for i := 2; i < len(num); i++{
		if strings.Contains(num_str, string(num[i])){
			flag = 0
		}else {
			flag = 1
		}
	}
	if flag == 0{
		fmt.Println("是整型")
	}else{
		println("不是整型")
	}




}
